package tmt.usercenter.web.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Vector;

/**
 * 与BootStrap TreeView组件的节点属性对应的类。
 */
@Getter
@Setter
public class TreeNodeVo implements Serializable {

	@Getter
	@Setter
	public class NodeState{
		private boolean checked = false;
		private boolean disabled = false;
		private boolean expanded = false;
		private boolean selected = false;
	}

	private String value;
	private String text;
	private String title;
	private String icon;
	private String selectedIcon = "glyphicon glyphicon-stop";
	private String color;
	private String backColor;
	private String href = "javascript:void(0)";
	private boolean selectable = true;
	private NodeState state = new NodeState();
	private String[] tags;

	public Vector<TreeNodeVo> nodes = new Vector<>();

	public TreeNodeVo(String value, String text, String title, boolean checked, boolean selected){
		this.value = value;
		this.text = text;
		this.title = title;
		this.state.checked = checked;
		this.state.selected = selected;
	}

	public TreeNodeVo(String value, String text, String title, String href,
					  boolean checked, boolean selected){
		this.value = value;
		this.text = text;
		this.title = title;
		this.href = href;
		this.state.checked = checked;
		this.state.selected = selected;
	}


}
